<!--
 * @Author: Lakeiedward
 * @Date: 2022-03-04 10:27:55
 * @LastEditTime: 2022-03-08 17:11:03
 * @FilePath: \xinde\src\components\two.vue
-->
<template>
  <div>
    <el-table
      ref="multipleTable"
      :data="list"
      style="width: 100%"
      row-key="shopId"
    >
      <el-table-column type="selection" width="55"> </el-table-column>
      <el-table-column prop="iid" label="姓名" width="120"> </el-table-column>
      <el-table-column prop="price" label="姓名" width="120"> </el-table-column>
      <el-table-column prop="title" label="地址" show-overflow-tooltip>
      </el-table-column>
    </el-table>
    <div class="block">
      <span class="demonstration">完整功能</span>
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="currentPage4"
        :page-sizes="[10]"
        :page-size="100"
        layout="total, sizes, prev, pager, next, jumper"
        :total="total"
      >
      </el-pagination>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      // 当前页
      currentPage4: 1,
      // 列表数据
      list: null,
      // 数据总数
      total: null,
    };
  },
  mounted() {
    this.xxx();
  },
  methods: {
    // 输入跳转页 赋值
    handleSizeChange(val) {
      this.currentPage4 = val;
      this.xxx();
    },
    // 点击下一页 赋值
    handleCurrentChange(val) {
      this.currentPage4 = val;
      this.xxx();
    },
    // 拉取数据列表
    xxx() {
      this.axios
        .get(
          `http://152.136.185.210:7878/api/hy66/home/data?type=new&page=${this.currentPage4}`
        )
        .then((res) => {
          console.log(res);
          this.list = res.data.data.list;
          this.total = res.data.data.total;
        });
    },
  },
};
</script>
<style scoped lang='scss'>
.el-popper {
  .el-radio__inner {
    display: none !important;
  }
}
</style>
<style lang='scss'>
.el-popper {
  .el-radio__inner {
    display: none !important;
  }
}
</style>